//
//  ServerProxy.h
//  e-nurse
//
//  Created by  on 9/26/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@class User;
@class Record;

@interface ServerProxy : NSObject

+(ServerProxy*)sharedInstance;

- (bool) isOnline;

- (void)login:(User*)user completedAction:(SEL)aSelector target:(id)target;
- (void)register:(User*)user completedAction:(SEL)aSelector target:(id)target;
- (void)logout;
- (void)activate:(int)userId activateCode:(int)code userName:(NSString*)name apiKey:(NSString*)apiKey completedAction:(SEL)aSelector target:(id)target;
- (void)resentActivateCode:(int)userId  userName:(NSString*)name apiKey:(NSString*)apiKey completedAction:(SEL)aSelector target:(id)target;

- (void)forgetPassword:(User*)user completedAction:(SEL)aSelector target:(id)target;

- (void)feedback:(NSString*)content completedAction:(SEL)aSelector target:(id)target;

- (void)addRecord:(Record*)record completedAction:(SEL)aSelector target:(id)target; 

- (int) currentUserId;

- (NSString*)getApiKey;

@property (strong, nonatomic) User* currentUser;

@end
